<template>
  <van-search v-model="value" placeholder="请输入搜索关键词" />
  <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
    <van-swipe-item>
      <img style="width: 100%;height: 100%;" src="../assets/loop1.png" alt="">
    </van-swipe-item>
    <van-swipe-item>
      <img style="width: 100%;height: 100%;" src="../assets/loop2.png" alt="">
    </van-swipe-item>
  </van-swipe>
  <van-notice-bar
  left-icon="volume-o"
  text="国庆节放假，金额有延迟。国庆节放假，金额有延迟。国庆节放假，金额有延迟。"
/>
<!-- 分类导航 -->
  <div class="nav">
    <van-row>
      <van-col span="6">
        <router-link>
          <p>图片</p>
          <p>文字</p>
        </router-link>
      </van-col>
      <van-col span="6">
        <router-link>登录</router-link>
      </van-col>
      <van-col span="6">
        <router-link>登录</router-link>
      </van-col>
      <van-col span="6">
        <router-link>登录</router-link>
      </van-col>
    </van-row>
  </div>
  <!-- 商品列表 -->
  <van-row gutter="10">
    <van-col span="12">
      <GoodsItem/>
    </van-col>
    <van-col span="12">
      <GoodsItem/>
    </van-col>
    <van-col span="12">
      <GoodsItem/>
    </van-col>
  </van-row>
  <div style="background-color: #3A6FF1;">颜色吸取测试</div>
  <div style="height: 60px;"></div>
  <!-- 底部导航 -->
  <van-tabbar v-model="active">
    <van-tabbar-item to="/" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item to="/type" icon="search">分类</van-tabbar-item>
    <van-tabbar-item to="/car" icon="shopping-cart-o">购物车</van-tabbar-item>
    <van-tabbar-item to="/my" icon="setting-o">我的</van-tabbar-item>
  </van-tabbar>

</template>

<script setup>
import GoodsItem from '@/components/GoodsItem.vue';

import { ref } from 'vue';

const active = ref(0);
</script>

<style scoped>
.nav{
  text-align: center;
}
</style>